<template>
  <div class="recommend">
    <ul>
      <li v-for="(item, index) in dataList" :key="index">
        <h3>
          <img :src="item.imgUrl" alt="" />
        </h3>
        <div class="msg">
          <p>{{ item.name }}</p>
          <p>{{ item.content }}</p>
          <p>价格：¥{{ item.pprice }}</p>
          <button>立即购买</button>
        </div>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  props: {
    dataList: Array,
  },
};
</script>

<style scoped lang="scss">
ul {
  display: flex;
  flex-wrap: wrap;
}
ul li {
  width: 50%;
  padding: 0.133333rem;
  box-sizing: border-box;
  img {
    width: 100%;
    height: 100%;
  }
}
.msg {
  font-size: 0.48rem;
  text-align: center;
}
</style>
